/**
 * @Author: 焦质晔
 * @Date: 2019/6/20
 * @Last Modified by:   焦质晔
 * @Last Modified time: 2019-06-20 15:45:00
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';
import * as types from './types';

// 查询
export const searchTools = params => axios.post(`${SERVER.TOOLMANAGEMENT}/sptTakeStockBill/search`, params, {
  mark: types.SEARCH
});

// 打印数据查询
export const print = params => axios.post(`${SERVER.TOOLMANAGEMENT}/sptTakeStockBill/print`, params, {
  mark: types.SEARCH
});

// 全部盘点按钮的打印
export const allToolPrint = params => axios.post(`${SERVER.TOOLMANAGEMENT}/sptTakeStockBill/allToolPrint`, params, {
  mark: types.SEARCH
});

// 开始盘点
export const startCheck = params => axios.post(`${SERVER.TOOLMANAGEMENT}/sptTakeStockBill/startCheck`, params, {
  mark: types.COMMIT
});

// 取消盘点列表查询
export const searchCancel = params => axios.post(`${SERVER.TOOLMANAGEMENT}/sptTakeStockBill/searchCancel`, params, {
  mark: types.SEARCH
});

// 取消盘点
export const cancelCheck = params => axios.post(`${SERVER.TOOLMANAGEMENT}/sptTakeStockBill/cancelCheck`, params, {
  mark: types.COMMIT
});

// 导出工具查询数据
export const exportTools = params => axios.post(`${SERVER.TOOLMANAGEMENT}/sptTakeStockBill/export`, params, {
  mark: types.SEARCH,
  responseType: 'blob'
});

// 全部盘点
export const allCheck = params => axios.post(`${SERVER.TOOLMANAGEMENT}/sptTakeStockBill/allCheck`, params, {
  mark: types.COMMIT
});

// 导出
// export const exportCustomerViewList = params => {
//   return axios({
//     url: `${SERVER.CYXDMS_CLUE}/potenCus/exportCustomerViewList`,
//     method: 'get',
//     params: params,
//     responseType: 'blob'
//   });
//   d;
// };
